Optimal. Leaf size=44 \[ -\frac {a^2 A}{x}+b (A b+2 a B) x+\frac {1}{2} b^2 B x^2+a (2 A b+a B) \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {27, 77}
\begin {gather*} -\frac {a^2 A}{x}+b x (2 a B+A b)+a \log (x) (a B+2 A b)+\frac {1}{2} b^2 B x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 77
Rubi steps
\begin {align*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )}{x^2} \, dx &=\int \frac {(a+b x)^2 (A+B x)}{x^2} \, dx\\ &=\int \left (b (A b+2 a B)+\frac {a^2 A}{x^2}+\frac {a (2 A b+a B)}{x}+b^2 B x\right ) \, dx\\ &=-\frac {a^2 A}{x}+b (A b+2 a B) x+\frac {1}{2} b^2 B x^2+a (2 A b+a B) \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 43, normalized size = 0.98 \begin {gather*} -\frac {a^2 A}{x}+2 a b B x+\frac {1}{2} b^2 x (2 A+B x)+a (2 A b+a B) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 44, normalized size = 1.00
method | result | size |
default | \(\frac {b^{2} B \,x^{2}}{2}+A \,b^{2} x +2 a b B x +a \left (2 A b +B a \right ) \ln \left (x \right )-\frac {a^{2} A}{x}\) | \(44\) |
risch | \(\frac {b^{2} B \,x^{2}}{2}+A \,b^{2} x +2 a b B x -\frac {a^{2} A}{x}+2 A \ln \left (x \right ) a b +a^{2} B \ln \left (x \right )\) | \(46\) |
norman | \(\frac {\left (b^{2} A +2 a b B \right ) x^{2}-a^{2} A +\frac {b^{2} B \,x^{3}}{2}}{x}+\left (2 a b A +a^{2} B \right ) \ln \left (x \right )\) | \(51\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 46, normalized size = 1.05 \begin {gather*} \frac {1}{2} \, B b^{2} x^{2} - \frac {A a^{2}}{x} + {\left (2 \, B a b + A b^{2}\right )} x + {\left (B a^{2} + 2 \, A a b\right )} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.42, size = 52, normalized size = 1.18 \begin {gather*} \frac {B b^{2} x^{3} - 2 \, A a^{2} + 2 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 2 \, {\left (B a^{2} + 2 \, A a b\right )} x \log \left (x\right )}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 42, normalized size = 0.95 \begin {gather*} - \frac {A a^{2}}{x} + \frac {B b^{2} x^{2}}{2} + a \left (2 A b + B a\right ) \log {\left (x \right )} + x \left (A b^{2} + 2 B a b\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 46, normalized size = 1.05 \begin {gather*} \frac {1}{2} \, B b^{2} x^{2} + 2 \, B a b x + A b^{2} x - \frac {A a^{2}}{x} + {\left (B a^{2} + 2 \, A a b\right )} \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 46, normalized size = 1.05 \begin {gather*} \ln \left (x\right )\,\left (B\,a^2+2\,A\,b\,a\right )+x\,\left (A\,b^2+2\,B\,a\,b\right )-\frac {A\,a^2}{x}+\frac {B\,b^2\,x^2}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________